import request from '@/utils/request'

export const ciphertext = (params) => {
  return request({
    method: 'get',
    url: '/Home/GenerateCipher',
    params
  })
}

export const ssokey = (params) => {
  return request({
    method: 'get',
    url: '/Home/GetSsoKey',
    params
  })
}
// 获取图形验证码
export const GenerateCaptcha = (params) => {
  return request({
    method: 'get',
    url: '/Home/GenerateCaptcha',
    params
  })
}
// 校验图形验证码
export const VerifyCaptcha = (params) => {
  return request({
    method: 'get',
    url: '/Home/VerifyCaptcha',
    params
  })
}
// 登录
export const Login = params => {
  return request({
    method: "get",
    url: "/Home/Login",
    params
  });
};
// 退出
export const Logout = params => {
  return request({
    method: "get",
    url: "/Home/Logout",
    params
  });
};
// 发送手机验证码
export const GetSmsCode = params => {
  return request({
    method: "get",
    url: "/Home/GetSmsCode",
    params
  });
};
// 校验手机验证码
export const VerifyCode = params => {
  return request({
    method: "get",
    url: "/Home/VerifyCode",
    params
  });
};
// 报警巡查
export const getAlarmInfo = (data) => {
  return request({
    method: 'post',
    url: '/api/authority/plat/sso/getAlarmInfo',
    data
  })
};
// 预警-监测-资源
export const getExhibitionInfo = (data) => {
  return request({
    method: 'post',
    url: '/api/authority/plat/sso/getExhibitionInfo',
    data
  })
}
// 解绑手机
export const UnbindPhone = (data) => {
  return request({
    method: "post",
    url: "/Home/UnbindPhone",
    data
  });
};
// 绑定手机
export const bindPhone = (data) => {
  return request({
    method: "post",
    url: "/Home/bindPhone",
    data
  });
};
// 解绑邮箱
export const UnbindEmail = (data) => {
  return request({
    method: "post",
    url: "/Home/UnbindEmail",
    data
  });
};
// 绑定邮箱
export const bindEmail = (data) => {
  return request({
    method: "post",
    url: "/Home/bindEmail",
    data
  });
};
// 获取邮箱验证码
export const GetEmailCode = params => {
  return request({
    method: "get",
    url: "/Home/GetEmailCode",
    params
  });
};
// 查询智慧生态资源数量
export const GetAllResNo = () => {
  return request({
    method: "get",
    url: "/Home/GetAllResNo",
  });
};

